/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package origendatos.dyd.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author erodrig
 */
@Entity
@Table(name = "HABILIDADES")
@NamedQueries({
    @NamedQuery(name = "Habilidades.findAll", query = "SELECT h FROM Habilidades h"),
    @NamedQuery(name = "Habilidades.findByNombre", query = "SELECT h FROM Habilidades h WHERE h.nombre = :nombre"),
    @NamedQuery(name = "Habilidades.findByCaracteristicaClave", query = "SELECT h FROM Habilidades h WHERE h.caracteristicaClave = :caracteristicaClave"),
    @NamedQuery(name = "Habilidades.findByGeneral", query = "SELECT h FROM Habilidades h WHERE h.general = :general"),
    @NamedQuery(name = "Habilidades.findByAsterisco", query = "SELECT h FROM Habilidades h WHERE h.asterisco = :asterisco")})
public class Habilidades implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "NOMBRE", nullable = false, length = 40)
    private String nombre;
    @Column(name = "CARACTERISTICA_CLAVE", length = 12)
    private String caracteristicaClave;
    @Column(name = "GENERAL", length = 1)
    private String general;
    @Column(name = "ASTERISCO", length = 2)
    private String asterisco;

    public Habilidades() {
    }

    public Habilidades(String nombre) {
        this.nombre = nombre;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getCaracteristicaClave() {
        return caracteristicaClave;
    }

    public void setCaracteristicaClave(String caracteristicaClave) {
        this.caracteristicaClave = caracteristicaClave;
    }

    public String getGeneral() {
        return general;
    }

    public void setGeneral(String general) {
        this.general = general;
    }

    public String getAsterisco() {
        return asterisco;
    }

    public void setAsterisco(String asterisco) {
        this.asterisco = asterisco;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nombre != null ? nombre.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Habilidades)) {
            return false;
        }
        Habilidades other = (Habilidades) object;
        if ((this.nombre == null && other.nombre != null) || (this.nombre != null && !this.nombre.equals(other.nombre))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "origendatos.dyd.model.Habilidades[nombre=" + nombre + "]";
    }

}
